﻿@model CultuRAM.Models.EventPropertyValue

@{
    ViewBag.Title = "Eliminar";
}
    <h4>Eliminar Propriedade</h4><br/>

    @using (Ajax.BeginForm("DeletePv", "EventPropertyValues", new AjaxOptions
        {
            UpdateTargetId = "tabEventPropRight",
            InsertionMode = InsertionMode.Replace,
            HttpMethod = "POST",
            OnSuccess = "UpdateEventProp(" + @Model.Event.EventId + ")"
        }))
    {

        <fieldset>
            <legend>EventPropertyValue</legend>
            @Html.HiddenFor(model => model.PropertyValueId)
            @Html.HiddenFor(model => model.Event.EventId, new { id = "EventId" }) @*//NAO ALTERAR*@
            @Html.HiddenFor(model => model.Event.Title)
          @*  @Html.HiddenFor(model => model.EventProperty.PropertyId,  new { id = "EventPropertyId" })*@
            @Html.HiddenFor(model => model.EventPropertyId)

            <span class="display-field">
                <b>@Html.DisplayFor(model => model.EventProperty.Name): </b>
            </span>
            <span class="display-field">
                @Html.DisplayFor(model => model.Value)
            </span>
        </fieldset>
    
        <br/><br/>
        <b>ATENÇÃO!</b><br />
        <span>O registo será eliminado definitivamente. Pretende Continuar?</span>
        <p>
            <br/><br />
            <button  type="submit" value="Eliminar" class="btn btn-danger"><i class="icon-ok icon-white"></i> Sim</button>
            @Html.Raw(@Ajax.ActionLink("replacetxt", "Default", null, new AjaxOptions
		        {
			            UpdateTargetId="tabEventPropRight", 
                        InsertionMode = InsertionMode.Replace, 
                        HttpMethod = "GET", 
                        OnComplete = "PropBgColorClear()"
		        }, new { @class = "btn btn-default" })
		        .ToHtmlString().Replace("replacetxt", "<i class=\"icon-ban-circle\"></i> Não"))
        </p>
    
    
    }

